#pragma once
#include <iostream>
#include <GLFW/glfw3.h>
#include "../global/event.h"
#include "../global/view.h"




class WindowMgr
{
private:
     WindowMgr();
     ~WindowMgr();
     WindowMgr(const WindowMgr &) = delete;            // 禁用拷贝构造
     WindowMgr &operator=(const WindowMgr &) = delete; // 禁用赋值操作符

    GLFWwindow *_window;
public:
    static WindowMgr *getInstance();
    void init();
    GLFWwindow *getWindow();
    void tick();
    void destroy();
    static void cursorPosCallback(GLFWwindow *window, double xpos, double ypos);
    static void mouseButtonCallback(GLFWwindow *window, int button, int action, int mods);
    static void windowSizeCallback(GLFWwindow *window, int width, int height);
    void onCursorPos(double xpos, double ypos);
    void onMouseButton(int button, int action, int mods);
    void onWindowSize(int width, int height);
    
};

